package com.ldg.rocketmq.listener;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * @Author: Liudao
 * @Date: 2022-09-30-15:16
 * @Description:
 */
@Component
@RocketMQMessageListener(topic = "ld-topic",consumerGroup = "consumer-group")
public class MyRocketmqListener implements RocketMQListener<String> {
    @Override
    public void onMessage(String message) {
        System.out.println("接收到消息：" + message);
    }
}
